home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2792 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  62 lines

  1. Path: EU.net!sun4nl!xs4all!marketgraph!rvg
  2. From: rvg@marketgraph.xs4all.nl (Ruud van Gaal)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: MatchFirst->Lock->Examine->ExAll = Enforcer (Help! :)
  5. Message-ID: <0636nbj60.alamito@marketgraph.xs4all.nl>
  6. Date: Mon, 5 Feb 96 13:54:06 CET
  7. References: <4ej668$f7u@ra.nrl.navy.mil>
  8. Reply-To: rvg@marketgraph.xs4all.nl
  9. X-Newsreader: Alamito Mail and News Manager (V2.0.4 for Waffle) registered to MARKETGRAPH VISUAL AUTOMATION
  10.  
  11. In <4ej668$f7u@ra.nrl.navy.mil> dyer@alx.sticomet.com (Doug Dyer) wrote:
  12.  
  13. >Hi folks, 
  14. >
  15. >I am trying to write a program that will, given an amigados
  16. >pattern, recursively descend directories and perform some
  17. >action on each file.  
  18. >
  19. >Im having a problem with an enforcer hit in ExAll() and Im
  20. >not sure why, so I thought Id post here with a synopsis
  21. >of the algorithm in case Im doing something "amiga-illegal".
  22. >
  23.  
  24. >... main .......
  25. >main()
  26. >if (MatchFirst()) {
  27. >    do {
  28. >        handlePath(pathname)
  29. >    } while (MatchNext())
  30. >
  31. >.... handlePath ...
  32. >
  33. >handlePath(pathname)
  34. >    lock (path, ACCESS_WRITE)
  35. >
  36. >    Examine (path)
  37. >    if (path is a directory)
  38. >        EnterDirectory(lock, pathname);
  39. >    else (do specific file thingie)
  40. >
  41. >    unlock(path)
  42. >
  43. >.... enterDirectory ....
  44. >
  45. >
  46. >    get the dos object, 
  47. >    use allocmem for alignment
  48. >    ExAll
  49. >        for each ExAllEntry, handlePath
  50. >            
  51.  
  52. The actual code could be more enlightening, since pseudo-code can only bug in 
  53. conceptual terms.
  54.  
  55. --
  56. Ruud van Gaal
  57. MarketGraph Visual Automation
  58. E-Mail                : rvg@marketgraph.xs4all.nl
  59. DoomShell 4.5 homepage: http://www.xs4all.nl/~jwkorver
  60. "...Works fascinates me. I could sit and watch it for hours..."
  61.  
  62.